<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<!-- basic styles -->
		<link href="assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="assets/css/font-awesome.min.css" />

		<!--[if IE 7]>
		  <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!-- page specific plugin styles -->

		<!-- fonts -->

		<!-- ace styles -->

		<link rel="stylesheet" href="assets/css/ace.min.css" />
		<link rel="stylesheet" href="assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="assets/css/ace-skins.min.css" />

		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->

		<script src="assets/js/ace-extra.min.js"></script>

		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

		<!--[if lt IE 9]>
		<script src="assets/js/html5shiv.js"></script>
		<script src="assets/js/respond.min.js"></script>
		<![endif]-->
		<link rel="stylesheet" href="css/jNotify.jquery.css" />  <!-- 提示框插件 -->
		<script src="assets/js/jquery-2.0.3.min.js"></script>
<title>管理中心 | 首页</title>
</head>
<body>
		<%@ include file="/include/ace_top_header.jsp" %>

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<%@ include file="/include/ace_left_header.jsp" %>

				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="#">管理中心</a>
							</li>
							<li class="active">控制台</li>
						</ul><!-- .breadcrumb -->

					
					</div>

					<div class="page-content">
						<div class="page-header">
							<h1>
								管理中心
								<small>
									<i class="icon-double-angle-right"></i>
									 控制台
								</small>
							</h1>
						</div><!-- /.page-header -->

						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->

								<form class="form-horizontal" role="form">

                         <div class="form-group">
                         <label class="col-sm-3 control-label no-padding-right">是否开启系统权值动态平衡</label>
                           <label class="col-sm-9">
                           <input class="ace ace-switch ace-switch-3" name="switch-field-1" type="checkbox" id="dynamic_equilibrium"  <c:if test="${dynamic_equilibrium == 1}">checked value="1"</c:if> <c:if test="${dynamic_equilibrium == 0}">value="0"</c:if> />
                           <span class="lbl"></span>
                           </label>
                          </div>
                          
                          															<div class="space"></div>
															<h4 class="header blue bolder smaller">一级权值设定</h4>
                          
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="logon_1"> 登陆1天 </label>

										<div class="col-sm-9">
											<input type="text" id="logon_1" placeholder="" class="col-xs-10 col-sm-5" value="${logon_1}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="logon_2"> 登陆2天 </label>

										<div class="col-sm-9">
											<input type="text" id="logon_2" placeholder="" class="col-xs-10 col-sm-5" value="${logon_2}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="logon_3"> 登陆3天 </label>

										<div class="col-sm-9">
											<input type="text" id="logon_3" placeholder="" class="col-xs-10 col-sm-5" value="${logon_3}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="logon_4"> 登陆4天 </label>

										<div class="col-sm-9">
											<input type="text" id="logon_4" placeholder="" class="col-xs-10 col-sm-5" value="${logon_4}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="logon_5"> 登陆5天 </label>

										<div class="col-sm-9">
											<input type="text" id="logon_5" placeholder="" class="col-xs-10 col-sm-5" value="${logon_5}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="logon_6"> 登陆6天 </label>

										<div class="col-sm-9">
											<input type="text" id="logon_6" placeholder="" class="col-xs-10 col-sm-5" value="${logon_6}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="logon_7"> 登陆7天 </label>

										<div class="col-sm-9">
											<input type="text" id="logon_7" placeholder="" class="col-xs-10 col-sm-5" value="${logon_7}" />
										</div>
									</div>


                                    <div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">发布动态</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="publish_dynamic" placeholder="" class="col-xs-10 col-sm-5" value="${publish_dynamic}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">点赞</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="praise" placeholder="" class="col-xs-10 col-sm-5" value="${praise}" />
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">评论</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="review" placeholder="" class="col-xs-10 col-sm-5" value="${review}" />
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">转发</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="forward" placeholder="" class="col-xs-10 col-sm-5" value="${forward}" />
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">关注</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="attention" placeholder="" class="col-xs-10 col-sm-5" value="${attention}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">关注数量log值</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="attention_log" placeholder="" class="col-xs-10 col-sm-5" value="${attention_log}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">点赞数量log权值</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="praise_log" placeholder="" class="col-xs-10 col-sm-5" value="${praise_log}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">评论数量log值</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="review_log" placeholder="" class="col-xs-10 col-sm-5" value="${review_log}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">转发数量log权值</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="forward_log" placeholder="" class="col-xs-10 col-sm-5" value="${forward_log}" />
										</div>
									</div>
									
									<div class="space"></div>
															<h4 class="header blue bolder smaller">二级权值设定</h4>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">跑步历史记录</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="profession_running_record_weight" placeholder="" class="col-xs-10 col-sm-5" value="${profession_running_record_weight}" />
										</div>
									</div>
								
									
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">游泳历史记录</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="profession_swimming_record_weight" placeholder="" class="col-xs-10 col-sm-5" value="${profession_swimming_record_weight}" />
										</div>
									</div>
									
									
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">篮球历史记录</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="profession_basketball_record_weight" placeholder="" class="col-xs-10 col-sm-5" value="${profession_basketball_record_weight}" />
										</div>
									</div>
									
									<div class="space"></div>
															<h4 class="header blue bolder smaller">三级权值设定</h4>
									
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">比赛等级一</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="match_level_1" placeholder="" class="col-xs-10 col-sm-5" value="${match_level_1}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">比赛等级二</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="match_level_2" placeholder="" class="col-xs-10 col-sm-5" value="${match_level_2}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">比赛等级三</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="match_level_3" placeholder="" class="col-xs-10 col-sm-5" value="${match_level_3}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">比赛等级四</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="match_level_4" placeholder="" class="col-xs-10 col-sm-5" value="${match_level_4}" />
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">跑步比赛结果权值</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="profession_running_result_weight" placeholder="" class="col-xs-10 col-sm-5" value="${profession_running_result_weight}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">篮球比赛抢断权值</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="profession_basketball_steal_weight" placeholder="" class="col-xs-10 col-sm-5" value="${profession_basketball_steal_weight}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">篮球比赛助攻权值</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="profession_basketball_assist_weight" placeholder="" class="col-xs-10 col-sm-5" value="${profession_basketball_assist_weight}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">篮球比赛篮板球权值</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="profession_basketball_rebound_weight" placeholder="" class="col-xs-10 col-sm-5" value="${profession_basketball_rebound_weight}" />
										</div>
									</div>
								
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">篮球比赛得分权值</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="profession_basketball_ponit_weight" placeholder="" class="col-xs-10 col-sm-5" value="${profession_basketball_ponit_weight}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">篮球比赛结果权值</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="profession_basketball_result_weight" placeholder="" class="col-xs-10 col-sm-5" value="${profession_basketball_result_weight}" />
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">游泳比赛结果权值</label>

										<div class="col-sm-9">
											<input type="text" name="tags" id="profession_swimming_result_weight" placeholder="" class="col-xs-10 col-sm-5" value="${profession_swimming_result_weight}" />
										</div>
									</div>
									

									<div class="clearfix form-actions">
										<div class="col-md-offset-3 col-md-9">
											<button class="btn btn-info" type="button" id="Submit">
												<i class="icon-ok bigger-110"></i>
												保存
											</button>

											&nbsp; &nbsp; &nbsp;
											<button class="btn" type="reset">
												<i class="icon-undo bigger-110"></i>
												重置
											</button>
										</div>
									</div>

									<div class="hr hr-24"></div>

								</form>
								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->

				
			</div><!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<!-- basic scripts -->



		<!--[if IE]>
<script src="assets/js/jquery-1.10.2.min.js"></script>
<![endif]-->

		<!--[if !IE]> -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='assets/js/jquery-2.0.3.min.js'>"+"<"+"script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='assets/js/jquery-1.10.2.min.js'>"+"<"+"script>");
</script>
<![endif]-->

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>"+"<"+"script>");
		</script>
		<script src="assets/js/bootstrap.min.js"></script>
		<script src="assets/js/typeahead-bs2.min.js"></script>

		<!-- page specific plugin scripts -->

		<!--[if lte IE 8]>
		  <script src="assets/js/excanvas.min.js"></script>
		<![endif]-->

		<script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
		<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
		<script src="assets/js/jquery.slimscroll.min.js"></script>
		<script src="assets/js/jquery.easy-pie-chart.min.js"></script>
		<script src="assets/js/jquery.sparkline.min.js"></script>
		<script src="assets/js/flot/jquery.flot.min.js"></script>
		<script src="assets/js/flot/jquery.flot.pie.min.js"></script>
		<script src="assets/js/flot/jquery.flot.resize.min.js"></script>

		<!-- ace scripts -->

		<script src="assets/js/ace-elements.min.js"></script>
		<script src="assets/js/ace.min.js"></script>

		<!-- inline scripts related to this page -->
		<script src="js/jNotify.jquery.js"></script>  <!-- 提示框插件 -->
		<script>
				$(function(){
			var $input_checkbox = $("input[type='checkbox']");
			
			$input_checkbox.click(function(){
				if($(this).prop("checked")){
					$(this).val(1);
				}else{
					$(this).val(0);
				}
			});
		});
				
				
				$(function(){
					$("#Submit").click(function(){
					var data={
					    logon_1 : $("#logon_1").val(),     //连续登陆一天
					    logon_2 : $("#logon_2").val(),     //连续登陆两天
					    logon_3 : $("#logon_3").val(),     //连续登陆三天
					    logon_4 : $("#logon_4").val(),     //连续登陆四天
					    logon_5 : $("#logon_5").val(),     //连续登陆五天
					    logon_6 : $("#logon_6").val(),     //连续登陆六天
					    logon_7 : $("#logon_7").val(),     //连续登陆七天
					    praise : $("#praise").val(),       //点赞
					    review : $("#review").val(),       //评论
					    attention : $("#attention").val(),     //关注
					    forward : $("#forward").val(),         //转发
					    publish_dynamic : $("#publish_dynamic").val(),   //发布动态
					    praise_log : $("#praise_log").val(),        //点赞log底数
					    review_log : $("#review_log").val(),        //评论log底数
					    attention_log : $("#attention_log").val(),     //关注log底数
					    forward_log : $("#forward_log").val(),       //转发log底数
					    match_level_1 : $("#match_level_1").val(),       //比赛等级1
					    match_level_2 : $("#match_level_2").val(),       //比赛等级2
					    match_level_3 : $("#match_level_3").val(),       //比赛等级3
					    match_level_4 : $("#match_level_4").val(),       //比赛等级4
					    profession_running_result_weight : $("#profession_running_result_weight").val(),   //跑步比赛结果权值
					    profession_running_record_weight : $("#profession_running_record_weight").val(),   //跑步历史记录权值
					    profession_basketball_steal_weight : $("#profession_basketball_steal_weight").val(),     //篮球比赛抢断权值
					    profession_basketball_assist_weight : $("#profession_basketball_assist_weight").val(),     //篮球比赛助攻权值
					    profession_basketball_rebound_weight : $("#profession_basketball_rebound_weight").val(),    //篮球比赛篮板球权值
					    profession_basketball_ponit_weight : $("#profession_basketball_ponit_weight").val(),     //篮球比赛得分权值
					    profession_basketball_result_weight : $("#profession_basketball_result_weight").val(),    //篮球比赛结果权值
					    profession_basketball_record_weight : $("#profession_basketball_record_weight").val(),    //篮球历史记录权值
					    profession_swimming_result_weight : $("#profession_swimming_result_weight").val(),    //游泳结果权值
					    profession_swimming_record_weight : $("#profession_swimming_record_weight").val(),    //游泳历史记录权值
					    dynamic_equilibrium : $("#dynamic_equilibrium").val(),  //是否开启动态平衡
					};
					
					    
					    	$.post("Weight_edit",{data:JSON.stringify(data)},function(data,status){
						    	if(data.result == true){
						    		//权值修改成功
						    		jSuccess("修改成功",{HorizontalPosition : "center",VerticalPosition : "center",ShowOverlay : false});
						    	}else{
						    		//权值修改失败
						    		jError("修改失败",{HorizontalPosition : "center",VerticalPosition : "center",ShowOverlay : false});
						    	}
						    },"json");
					    });
					    
					
				});
				
				
				</script>
</body>
</html>